package cn.tedu.spring.config;

import cn.tedu.spring.file.Database;
import cn.tedu.spring.resource.WeiboMapper;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 测试类
 */
public class TestSpringConfig {
    public static void main(String[] args) {
        ApplicationContext context=new AnnotationConfigApplicationContext(SpringConfig.class);
        Database database = context.getBean(Database.class);
        System.out.println(database);
        WeiboMapper weiboMapper = context.getBean(WeiboMapper.class);
        System.out.println(weiboMapper);
    }
}
